Back
About Snapshots
What is a Snapshot?
A snapshot is a feature that preserves the state of a virtual machine instance at a specific point in time. A snapshot saves the configuration information and data of a virtual machine.
In addition to preserving the state of a virtual machine instance, snapshots also allow you to:
- Create a virtual machine from a snapshot (clone)
- Export the virtual machine at the time of taking the snapshot as an OVA/XVA (data can be downloaded locally, etc.)
- Roll back a virtual machine to the state it was in when a snapshot was created
Also, a snapshot is just a preserved version of the current state and is not a “backup.” If you need a backup or replica, you will need to prepare backup storage.
Snapshot Types
HRPC6Gf Xen edition supports the following types of virtual machine snapshots:
- New Snapshot: Disk (storage)
- New Snapshot with memory: disk (storage) and memory (RAM)
New Snapshot
Create a snapshot of the disk (storage).
Any virtual machine that is rolled back to this snapshot, or cloned or exported will start from the “forced reset at this point” state.
If xentools is installed, it will at least flush the disk contents in the virtual OS. If not, it is better to use the sync command (Linux, etc.) to preserve it.
New Snapshot with memory
Create a snapshot of your disk (storage) and memory (RAM).
This snapshot includes memory, so when you roll back to a snapshot, the memory contents are restored as well, making it behave like resuming from a suspend.
However, creating a snapshot that includes memory writes all memory contents to disk, so the virtual machine will be paused during that time and will be unavailable until the memory image has been taken.
Retaining Snapshots
The maximum number of snapshots, including those created automatically by the system, is 30 per virtual machine.
How to Create a Snapshot
For HRPC6Gf Xen version, create a snapshot in the following way:
- Manual snapshot creation : Manually created by the user
- Automatic creation of regular snapshots : Automatic creation of regular snapshots by rolling snapshots
- Automatic creation by replication: Automatic creation by snapshot replication process
Understanding the structure of snapshots in Xen
Xen snapshots are a snapshot method that uses a backing store. Therefore, when a snapshot is taken, the existing virtual disk image is reserved as read-only, and the differences thereafter are stored in the backing store (difference disk). As a result, the number of virtual disk images increases by the number of snapshots.
The more difference information there is, the slower the reading process will be, because the reading process will have to refer to “difference n → difference n-1 → … → difference 1 → original data” in that order. Also, if you leave unnecessary snapshots as they are, the difference disk images will continue to grow, taking up space on your storage.
Therefore, the total number of snapshots is fixed, and the maximum number of snapshots, including those used by the system, is 30. Also, since the original data is shared in this way, snapshots are not backups, but only provide logical data protection within the virtual machine instance, and cannot withstand disk destruction in the hypervisor layer. Therefore, backups must be taken separately.
When you delete a snapshot, a process runs to combine the original disk and the difference disk.
In reality, there is also a process of merging backing stores, which are differential disks, and in this case, to ensure that no data is lost due to an unexpected accident during the merging process, a separate data image is created on the storage by combining the two differences, and the unnecessary differential image is deleted at the end. Therefore, free space for this area is also required. As a guideline, it is necessary to have about the same amount of free space as the backing store of the snapshot to be deleted.
The process of merging the difference disks for deletion is delayed. Therefore, even if the snapshot appears to have disappeared, temporary space is used until the merging process is complete, so you must always ensure that there is free space. For information on the mechanism of deleting snapshots, see Support Information/Manuals/HRPC – Xen Orchestra/Virtual Machine Management/Deleting Snapshots .
If you have a certain amount of snapshots, live migration will not work. Therefore, be sure to delete them when you no longer need them.